package com.nineclock.system.controller;

import afu.org.checkerframework.checker.units.qual.A;
import com.nineclock.common.entity.Result;
import com.nineclock.system.SysCompanyContactConfigController.SysUserControllerApi;
import com.nineclock.system.dto.SysRegisterDTO;
import com.nineclock.system.service.SysCompanyUserService;
import com.nineclock.system.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/user")
public class SysUserController implements SysUserControllerApi {

    @Autowired
    private SysUserService userService;
    /*
    * 注册用户
    * */
    @Override
    @PostMapping("/register")
    public Result<Long> register(SysRegisterDTO sysRegisterDTO) {
       Long userId =userService.register(sysRegisterDTO);

        return Result.success(userId);
    }
}
